include ../../PreProjectHelper.mk

LLVM_CONFIG    ?= llvm-config
LLVM_EXISTS   = $(shell which $(LLVM_CONFIG) > /dev/null && echo asdf)

ifneq ("$(LLVM_EXISTS)", "asdf")
    $(error Invalid llvm config $(LLVM_EXISTS))
endif


LIB            := WNScripting
DEPLIBS        := WNFileIO WNMemory WNThreading
SOURCES        := WNDataType.cpp WNExpression.cpp WNExpressionList.cpp WNFunctionHeaderList.cpp WNFunctionManager.cpp \
                  WNIdentifierMap.cpp WNInstruction.cpp WNLexerFunctions.cpp WNLValue.cpp WNParseNode.cpp WNParseTree.cpp \
                  WNScopedVariableList.cpp WNScriptingEngine.cpp WNTopLevelElement.cpp WNTypeManager.cpp 
LEXERS         := WNScriptLexer.re WNQuickLexer.re
PARSERS        := WNScriptParser.y
CXXFLAGS       += $(shell $(LLVM_CONFIG) --cppflags) -std=c++0x
ADDITIONALLIBS += $(addsuffix .a, $(addprefix ../../$(BINDIR)$(TARGET)/lib,$(DEPLIBS))) $(shell $(LLVM_CONFIG) --libfiles)

include ../../ProjectHelper.mk
